
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Home</title>
    <link rel="stylesheet" href="/public/css/main.css">
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
    <script src="/public/js/index.js"></script>
</head>
<body>

    <header>
        <img src="" alt="">
        <img src="" alt="">
    </header>
    <nav>
        <div class="top-category">
            <span><a href="">首页</a></span>
            <span><a href="">HTML5</a></span>
            <span><a href="">CSS</a></span>    
            <span><a href="">JAVASCRIPT</a></span>
            <span><a href="">PHP</a></span>
            <span><a href="">JAVA</a></span>
            <span><a href="">Express</a></span>
        </div>
    </nav>

    <div class="main-container">
        <div class="blog-list-container">
            <div class="blog-container">
                <div class="title">h1标签</div>
                <span>作者：admin</span>
                <span>时间：2016年7月19 1:3:37</span>                    <span>阅读：231</span>
                <span>评论：10</span>
                <p class="blog-content">PHP框架-binglin</p>
                <a href="">阅读全文</a>
            </div>
            <div class="blog-container">
                    <div class="title">h1标签</div>
                    <span>作者：admin</span>
                    <span>时间：2016年7月19 1:3:37</span>                    <span>阅读：231</span>
                    <span>评论：10</span>
                    <p class="blog-content">PHP框架-binglin</p>
                    <a href="">阅读全文</a>
                </div>
                <div class="blog-container">
                        <div class="title">h1标签</div>
                        <span>作者：admin</span>
                        <span>时间：2016年7月19 1:3:37</span>                    <span>阅读：231</span>
                        <span>评论：10</span>
                        <p class="blog-content">PHP框架-binglin</p>
                        <a href="">阅读全文</a>
                    </div>
                <div class="blog-container">
                            <div class="title">h1标签</div>
                            <span>作者：admin</span>
                            <span>时间：2016年7月19 1:3:37</span>                    <span>阅读：231</span>
                            <span>评论：10</span>
                            <p class="blog-content">PHP框架-binglin</p>
                            <button class="button">阅读全文</button>
                            
                        </div>
        </div>
            
        <div class="user-container">
            {% if userInfo.id %}
            <div class="rightBox" id="userInfo">
                <div class="title"><span>用户信息</span></div>
                    <p><span class="username">{{userInfo.username}}</span></p>
                    {% if userInfo.isAdmin %}
                        <p>
                            <span class="colDanger">你好，管理员！</span>
                            <a href="/admin">进入管理</a>
                        </p>
                    {% else %}
                        <p><span>你好，欢迎光临我的博客</span></p>                    
                    {% endif %}
                    <p><span class="colDark"><a href="javascript:;" id="logout">退出</a></span></p>
                </div>
            {% else %}
                <div class="rightBox" id="loginBox">
                    <div class="title"><span>登录</span></div>
                    <div><span>用户名:</span><input type="text" name="username"></div>
                    <div><span>密码:</span><input type="password" name="password"></div>
                    <button class="button">登录</button>
                    <p class="colWarning"></p>
                    <p>还没注册?<a href="javascript:;">马上注册</a></p>

                </div>
                <div class="rightBox" id="registerBox" style="display: none;">  
                    <div class="title"><span>注册</span></div>
                    <div><span>用户名:</span><input type="text" name="username"></div>
                    <div><span>密码:</span><input type="password" name="password"></div>
                    <div><span>确认:</span><input type="password" name="repassword"></div>
                    <div><span></span><button class="button">注册</button></div>
                    <p class="colWarning"></p>
                    <p>已注册?<a href="javascript:;">登 录</a></p>
                </div>
            {% endif %}
            </div>

        </div> 
</body>
</html>